package ru.hashcode.hashdroid.proxy;

import java.util.ArrayList;
import java.util.Iterator;

public class Answer extends Node implements Iterable<Comment>{
	private ArrayList<Comment> children; 
	Answer(User author, String text) {
		super(author, text);
		children = new ArrayList<Comment>();
	}
	@Override
	public Iterator<Comment> iterator() {
		return children.iterator();
	}
	public void addChild(Comment child){
		this.children.add(child);
	}
	public void removeChild(Comment child){
		this.children.remove(child);
	}
	public int getComCount() {
		return children.size();
	}
}
